package com.xixilala.video.practices

import android.opengl.GLSurfaceView
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.xixilala.video.base.BaseFragment
import com.xixilala.video.views.TriangleGLSurfaceView

/**
 * 学习 Android 平台 OpenGL ES API，了解 OpenGL 开发的基本流程，使用 OpenGL 绘制一个三角形
 */
class Practice5Fragment : BaseFragment() {

    private var mGlSurfaceView :GLSurfaceView ?= null

    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {

        mGlSurfaceView = TriangleGLSurfaceView(mActivity).apply {
            layoutParams = ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,ViewGroup.LayoutParams.MATCH_PARENT)
        }
        return mGlSurfaceView!!
    }

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)


        mGlSurfaceView?.run {



        }
    }
}